* charset.c: Fix file descriptor leaks and errno issues.
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 18 Jul 2013 02:12:59 +0000 (19:12 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 18 Jul 2013 02:12:59 +0000 (19:12 -0700)
commita89d83d70fcb50bc39f10b7bb2927ed268eca2cd
treeb2ba1541d3aec74eab1895e08b69196b3610a4d7
parentd3805d6be0d8da85e5e778314581af121e2f3d4c
* charset.c: Fix file descriptor leaks and errno issues.

Include <errno.h>.
(load_charset_map_from_file): Don't leak file descriptor on error.
Use plain record_xmalloc since the allocation is larger than
MAX_ALLOCA; that's simpler here.  Simplify test for exhaustion
of entries.
* eval.c (record_unwind_protect_nothing):
* fileio.c (fclose_unwind):
New functions.
* lread.c (load_unwind): Remove.  All uses replaced by fclose_unwind.
The replacement doesn't block input, but that no longer seems
necessary.
src/ChangeLog
src/charset.c
src/eval.c
src/fileio.c
src/lisp.h
src/lread.c